<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		
		<style type="text/css">
			
			*{
				margin: 0;
				padding: 0;
			}
			.box1{
				background-color: red;
			}
			
			.box1::after{
				content: '';
				display: block;
				height: 0px;
				visibility: hidden;
				clear: both;
			}
			.box1{
				
				/* 兼容ie6 */
				*zoom:1;
			}
			.box2{
				background-color: pink;
		 
				/* margin-top: 100px; */
			}
			
			.box1 p{
				width: 100px;
				background-color: blue;
				float: left;
			}
			.box2 p{
				width: 100px;
				background-color: yellow;
				float: left;
			}
		</style>
	</head>
	<body>
		
		<!-- 
		 伪元素选择器是新特性 对于老版本的浏览器会有兼容问题 ie
		 
		 
		 -->
		<div class="box1">
			<p>我是文字1</p>
			<p>我是文字1</p>
			<p>我是文字1</p>
		</div>
		
		
		<div class="box2">
			<p>我是文字2</p>
			<p>我是文字2</p>
			<p>我是文字2</p>
		</div>
		
		
	</body>
</html>